package org.example.goods;

import java.math.BigDecimal;

public class Goods {
    //折扣系数
    private BigDecimal discount = new BigDecimal("1");

    //价格
    private BigDecimal price;

    private String name;

    public Goods(String name,BigDecimal price,BigDecimal discount){
        this.name = name;
        this.setPrice(price);
        this.setDiscount(discount);
    }
    public Goods(String name,BigDecimal price){
        this.name = name;
        this.price = price;
    }


    public BigDecimal getPrice() {
        return price;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount){
        this.discount = discount;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }
}
